package com.andy.buyu.server.dto;

import com.andy.buyu.server.game.GameUser;
import com.andy.buyu.server.utils.GoConstant;

import io.netty.buffer.ByteBuf;

/**
 * 锁定攻击
 * @author cuiwm
 */
public class LockAttackMessage extends BaseMessage{
	
	private GameUser user;
	private int lostCoin;
	private int scriptId;
    
    public LockAttackMessage(GameUser user,int lostCoin,int scriptId) {
    	this.user = user;
    	this.lostCoin = lostCoin;
    	this.scriptId = scriptId;
	}

	@Override
	public void writeBody(ByteBuf buf) {
		writeString(buf, user.getId().toString());
		buf.writeByte(GoConstant.BATTERY_TYPE_1);
		buf.writeInt(lostCoin);
		buf.writeInt(scriptId);
	}


}